cd  "J:\gov2001\"

*data from across 1993- 2007

use "Source\dist_outcome.dta", clear

set more off
tempname myfile1 
file open `myfile1' using "Output\decriptives_state.txt", write text replace
file write `myfile1' _tab "State median"  _n 
foreach v of varlist  averageclasssize averagedailyattenada expendituresperada englishlearners freeorreducedmeals minority ethnicdiversityindex  numberofteachers numberoffulltimeequivalents fullycredentialled  pupilsperteacher averageteachersalary gradsuccsucourses yeardropoutrate twoyrsexperience ba60salary proficientlangarts proficientmath adjusted1yeardropoutrate   {
	quietly: sum (`v'), d
	local a = r(p50)
	file write `myfile1' "`v'" _tab "`a'" _n
            }		

sort year
bysort year: egen cs_med=median(averageclasssize)
			

twoway (connected cs_med year if year<=2007, xlabel(1992 (2) 2008) ylabel(22 (1) 28) ytitle("Median Classsize"))


